home *** CD-ROM | disk | FTP | other *** search
- 10 ;SRCH DSK 7
- 11 ;
- 12 ;CONVERT HEX TO ASCII FOR SCREEN
- 13 ;
- 20 PRNTDATA LDA TRK;EXAMPLE TRK #$1B (27 ASCII)
- 30 JSR HEX
- 40 LDA TEMP
- 50 STA TRKLO;HOLDS A ASCII 31 (1)
- 60 LDA TEMP+1
- 70 STA TRKHI;HOLDS A ASCII 42 (B)
- 80 LDA SEC
- 90 JSR HEX
- 100 LDA TEMP
- 110 STA SECLO
- 120 LDA TEMP+1
- 130 STA SECHI
- 140 JMP SCRN
- 150 HEX STA TEMP+1; #$1B 00011011
- 160 AND #$F0; 11110000
- 161 ;EQUALS 00010000
- 165 LSR; 00001000
- 170 LSR; 00000100
- 171 LSR; 00000010
- 172 LSR; 00000001
- 180 ADC #$30;= 31 ASCII = 1
- 190 STA TEMP
- 200 LDA TEMP+1;#$1B 00011011
- 220 AND #$0F; 00001111
- 225 ;EQUALS #$0B 00001011
- 230 CMP #$0A
- 240 BCC UNDER
- 250 CLC
- 260 ADC #$07;NOW EQUALS #$12
- 270 UNDER CLC
- 280 ADC #$30;NOW EQUALS #$42 (B IN ASCII)
- 290 STA TEMP+1
- 300 RTS
- 310 SCRN LDY #$00
- 320 LP7 LDA DATA,Y
- 330 CMP #$00
- 340 BEQ ENDPRT
- 350 JSR PRINT
- 355 INY
- 360 JMP LP7
- 370 ENDPRT JMP INCR
- 380 .FILE SRCH DSK 8
-